Add A Return To Previous Page Button Next To ADD TO CART Button

Use this line of code-cut and paste to the button field on BACK BUTTON WIDGET Plugin:

<button type="button" class="button wc-backward">Return To Order Or Previous Page</button>

PHP Snippet: Copy and paste the PHP snippet below to your CODE SNIPPETS Pluging aka WPCODE

add_action( 'woocommerce_after_add_to_cart_button', 'add_my_shortcode_after_add_to_cart' );

function add_my_shortcode_after_add_to_cart() {
    echo do_shortcode( '[alg_back_button label="Return To Previous Page"]' ); // Replace [your_shortcode] with your actual shortcode
}

CSS Snippet: Styles the button and adds margin between buttons, Copy and paste the CSS snippet below

button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
      background-color: #003bb3;
    border-radius: 8px;
    margin-left: 5px;
}

CSS Snippet: Changes color of ADD TO CART Button

.button.single_add_to_cart_button.button.alt {
  background-color: #003bb3;
  color: #fff;
}